package com.bestcem.xm.txtanls.service;


import com.bestcem.xm.common.core.domain.web.ServiceResult;
import com.bestcem.xm.qdes.grpc.v1.services.OpenQuestion;
import com.bestcem.xm.txtanls.grpc.service.param.survey.GetSurveyAnalysisProjectParam;
import com.bestcem.xm.txtanls.grpc.service.param.survey.UpdateOpenOptionParam;
import com.bestcem.xm.txtanls.service.dto.analysis.AnalysisProjectDTO;

import java.util.List;

/**
 * 问卷分析项目相关业务接口
 *
 * @author XiaoYunSong <ys.xiao@idiaoyan.com>
 * @version v1.0
 * @date 2021/5/8
 */
public interface SurveyService {
    /**
     * 查询当前问卷下所有可参与分析的开放选项
     *
     * @param surveyId 问卷id
     * @return All open options in the survey
     * @author LiHeng <heng.li@idiaoyan.cn>
     */
    ServiceResult<List<OpenQuestion>> getSurveyOpenOptions(String surveyId);

    /**
     * 获取问卷分析项目信息
     *
     * @param param@return Survey analysis project information
     * @return The analysis project
     * @author XiaoYunSong <ys.xiao@idiaoyan.cn>
     * @date 2021/6/23 13:54
     */
    ServiceResult<AnalysisProjectDTO> getSurveyAnalysisProject(GetSurveyAnalysisProjectParam param);

    /**
     * 更新当前问卷下参与分析的开放选项
     *
     * @param param 问卷开放选项更新参数
     * @return All open options in the survey
     * @author XiaoYunSong <ys.xiao@idiaoyan.cn>
     * @date 2021/5/13 15:54
     */
    ServiceResult<AnalysisProjectDTO> updateOpenOptions(UpdateOpenOptionParam param);
}
